`export PS1='value'` does not propagate to (Korn) subshells for root?

Posted by user319845 on Stack Overflow See other posts from Stack Overflow or by user319845
Published on 2011-01-02T22:19:42Z Indexed on 2011/01/07 22:54 UTC
Read the original article Hit count: 117

Filed under:
|

Please consider the following /root/.profile:

export PS1=value1
export x=value2

How come the login shell shows the expected prompt (and $x as value2), while the subshells keep showing $x as value2 but $PS1 as '#'? Just in case, I'm trying this under OpenBSD.

[Yeah, I know... What on earth am I doing with OpenBSD if I don't know this? Just toying... in an isolated, most definitely non-production VM =).]

© Stack Overflow or respective owner

Related posts about shell

Related posts about ksh